package com.kangfu.db.mapper;

import com.kangfu.db.domain.entity.UserInfo;
import com.kangfu.db.domain.entity.UserInfoType;
import com.kangfu.db.model.bo.UserInfoCountBo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface UserInfoMapper {

    public UserInfo selectByUserIdAndSubType(@Param("userId") int userId, @Param("type") int type, @Param("subType") int subType);

    public List<UserInfo> selectByUserIdAndType(@Param("userId") int userId, @Param("type") int type);

    public Integer updateByUserIdAndType(UserInfo userInfo);

    public Integer insertUserInfo(UserInfo userInfo);

    public List<UserInfo> selectByUserId(@Param("userId") int userId);

    public List<UserInfoType> selectTypeList();

    @MapKey("type")
    public Map<Integer,UserInfoCountBo> selectCountBoByUserId(@Param("userId") int userId);
}

